//
// Created by wze-zero on 2024/8/26 026.
//
#include <iostream>

using namespace std;

int main() {
    int hour, minute;
    long int k;
    scanf("%d:%d %ld", &hour, &minute, &k);
    hour = (hour + (minute + k) / 60) % 24;
    minute = (minute + k) % 60;
    printf("%02d:%02d", hour, minute);
    return 0;
}